<!--
 * @Author: 生俊甫 1758142861@qq.com
 * @Date: 2024-05-30 14:14:34
 * @LastEditors: 生俊甫 1758142861@qq.com
 * @LastEditTime: 2024-06-16 16:16:54
 * @FilePath: \html5-main\html\contactUs.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>主页</title>
        <link rel="stylesheet" href="../css/Index.css" type="text/css">
        <link rel="stylesheet" href="../css/contactUS.css" type="text/css">
    </head>
    <body>
    
        <div id="con-top">
            <div id="top-left">
                <p>
                    Contract Us
                </p>
            </div>
            <div id="top-back">
                <a href="../html/Index.html">回到首页</a>
                &nbsp;&nbsp;&nbsp;&nbsp;
             
            </div>
        </div>
        <div id="con-center">
            <br>
            <form action="">
                <p>
                    <input type="text" placeholder="Name" required>
                </p>
                <p>
                    <input type="text" placeholder="E-mail" required>
                </p>
                <p>
                    <input type="text" placeholder="Subject" required>
                </p>
                <p>
                    <textarea placeholder="Message" required></textarea>
                </p>
                <p>
                    <input type="submit" value="提交">
                </p>
            </form>
        </div>
        <div id="bottom">
            Copyright © 2021级通信工程一班 生俊甫 21090126. All rights reserved.&nbsp;&nbsp;
        </div>
    </body>
    <script>
        // 获取搜索输入框、搜索按钮和搜索结果的引用
    const searchInput = document.getElementById('search-input');
    const searchButton = document.getElementById('search');
    const searchResults = document.getElementById('search-results');
    const centerContent = document.getElementById('center').textContent.toLowerCase();
    // 创建函数来执行搜索并显示结果在新页面
    function performSearch() {
        const searchTerm = searchInput.value.toLowerCase();

        if (centerContent.includes(searchTerm)) {
            window.location.href = `search-results.html?term=${searchTerm}`;
        } else {
            window.location.href = `search-results.html`;
        }
    }
    // 添加事件监听器，以便在搜索按钮点击时执行搜索
    searchButton.addEventListener('click', performSearch);
    </script>
</html>